home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / phigs / ptk.lha / ptk / fortran / source / library / stct.f < prev    next >
Encoding:
Text File  |  1992-06-18  |  3.8 KB  |  122 lines

  1. C----------------------------------------------------------------------------
  2.  
  3. C Module name: structure content drawer
  4.  
  5. C Author: Toby Howard
  6.  
  7. C Function: This module implements the structure content drawer.
  8.  
  9. C Dependencies:
  10.  
  11. C External function list: 
  12.  
  13. C Internal function list: 
  14.  
  15. C Hashtables used: "structureid", "label".
  16.  
  17. C Modification history : (Version), (Date), (Name), (Description).
  18.  
  19. C 1.0, ????, Toby Howard, First version.
  20.  
  21. C 1.1, 15th July 1988, Steve Larkin, Modified to work with VAX Phigs.
  22.  
  23. C 2.0, 27th August 1991, Gareth Williams, Translated to C.
  24.  
  25. C----------------------------------------------------------------------------
  26.  
  27.        SUBROUTINE ptkf_structcontent(wsid, stid, firstel, lastel, 
  28. & elemptr, font, error)
  29. C /*
  30. C ** \parambegin
  31. C ** \param{INTEGER}{wsid}{workstation identifier}{IN}
  32. C ** \param{INTEGER}{stid}{structure identifier}{IN}
  33. C ** \param{INTEGER}{firstel}{first element in range}{IN}
  34. C ** \param{INTEGER}{lastel}{last element in range}{IN}
  35. C ** \param{INTEGER}{elemptr}{element pointer}{IN}
  36. C ** \param{INTEGER}{font}{text font}{IN}
  37. C ** \param{INTEGER}{error}{error code}{OUT}
  38. C ** \paramend
  39. C ** \blurb{This function inserts a diagram of the contents of the structure
  40. C ** {\tt stid} in the currently open structure at the current editing 
  41. C ** position. The diagram consists of a table of elements represented
  42. C ** by rectangles and labelled with element type and number. The table
  43. C ** has a heading with the format:
  44. C ** {\tt "structure N "name" (M elements)"}
  45. C ** where N is the structure identifier, name is the structure name
  46. C ** extracted from the "structureid" hashtable and M is the total
  47. C ** number of elements in the structure.}
  48. C */
  49.        INTEGER wsid, stid, firstel, lastel, elemptr, font, error
  50.        external ptk_structcontent !$PRAGMA C(ptk_structcontent)
  51.  
  52.        call ptk_structcontent(%val(wsid), %val(stid), %val(firstel), 
  53. & %val(lastel), %val(elemptr), %val(font), error)
  54.  
  55.        RETURN
  56.        END
  57.  
  58.        SUBROUTINE ptkf_inqstructcontentrange(contentstid, firstel, 
  59. & lastel, err)
  60. C /*
  61. C ** \parambegin
  62. C ** \param{INTEGER}{contentstid}{content structure identifier}{IN}
  63. C ** \param{INTEGER}{firstel}{element pointer}{OUT}
  64. C ** \param{INTEGER}{lastel}{element pointer}{OUT}
  65. C ** \param{INTEGER}{err}{error indicator}{OUT}
  66. C ** \paramend
  67. C ** \blurb{This function may be used to obtain the element range 
  68. C ** which appears in the structure content diagram.}
  69. C */
  70.        INTEGER contentstid, firstel, lastel, err
  71.        external ptk_inqstructcontentrange 
  72. & !$PRAGMA C(ptk_inqstructcontentrange)
  73.  
  74.        call ptk_inqstructcontentrange(%val(contentstid), firstel, 
  75. & lastel, err)
  76.  
  77.        RETURN
  78.        END
  79.  
  80.        SUBROUTINE ptkf_setstructcontentelemptr(contentstid, elemptr)
  81. C /*
  82. C ** \parambegin
  83. C ** \param{INTEGER}{contentstid}{content structure identifier}{IN}
  84. C ** \param{INTEGER}{elemptr}{element pointer}{IN}
  85. C ** \paramend
  86. C ** \blurb{This function draws an arrow pointing the element {\tt elemptr}
  87. C ** in the structure content diagram.}
  88. C */
  89.        INTEGER contentstid, elemptr
  90.        external ptk_setstructcontentelemptr 
  91. & !$PRAGMA C(ptk_setstructcontentelemptr)
  92.  
  93.        call ptk_setstructcontentelemptr(%val(contentstid), 
  94. & %val(elemptr))
  95.  
  96.        RETURN
  97.        END
  98.  
  99.        SUBROUTINE ptkf_inqstructcontentelemptr(contentstid, elemptr,
  100. & err)
  101. C /*
  102. C ** \parambegin
  103. C ** \param{INTEGER}{contentstid}{content structure identifier}{IN}
  104. C ** \param{INTEGER}{elemptr}{element pointer}{OUT}
  105. C ** \param{INTEGER}{err}{error indicator}{OUT}
  106. C ** \paramend
  107. C ** \blurb{This function may be used to obtain the element number pointed
  108. C ** to by the element arrow in the structure content diagram.}
  109. C */
  110.        INTEGER contentstid, elemptr, err
  111.        external ptk_inqstructcontentelemptr 
  112. & !$PRAGMA C(ptk_inqstructcontentelemptr)
  113.  
  114.        call ptk_inqstructcontentelemptr(%val(contentstid), 
  115. & elemptr, err)
  116.  
  117.        RETURN
  118.        END
  119.  
  120. C end of stct.f
  121.  
  122.